﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileReligionProcessAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileReligionProcessAdmin" %>

<owc:OwGrid ID="HomeProfileReligionProcessGrid" runat="server" SkinID="OwGridAdmin"
    DataSourceID="HomeProfileReligionProcessOds">
    <MasterTableView DataSourceID="HomeProfileReligionProcessOds" DataKeyNames="OpenHomeProfileReligionProcessID">
<CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>" RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenHomeProfileReligionProcessID") %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:ThumbImage %>'>
                <ItemTemplate>
                    <img id="ThumbImageImg" width="80px" height="80px" src='<%# OwReligionsBLL.OwGetEntity((long?)Eval("ReligionID")).ThumbImage %>' alt="" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
            
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b>
                                    <%# OwReligionsBLL.OwGetEntity((long?)Eval("ReligionID")).Name.OwGetLeft(100,true) %>
                                </b></a>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="ProfileDetailOwR" runat="Server" OwText="ProfileDetailLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwOpenHomeProfileDetailsBLL.OwGetEntity(Eval("OpenHomeProfileDetailID").OwToInt64TryParseReturn0()).Title.OwGetLeft(100, true)%>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="StartDateOwR" runat="Server" OwText="StartDateLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("StartDate").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="EndDateOwR" runat="Server" OwText="EndDateLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("EndDate").OwToDateTimePublishDate() %>
                            </td>
                        </tr>                        
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>                                
                                <owc:OwR ID="LanguageOwR" runat="server" OwText="Language" OwSuffix=":" />
                            </td>
                            <td>
                                <%# OwReligionsBLL.OwGetEntity((long?)Eval("ReligionID")).LanguageCode %>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="MembersOwR" runat="server" OwText="MembersLabel" OwSuffix=":" ></owc:OwR>
                            </td>
                            <td>
                                <%# OwReligionsBLL.OwGetEntity((long?)Eval("ReligionID")).Members%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ParentOwR" runat="Server" OwText="ParentLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwReligionsBLL.OwGetEntity(OwReligionsBLL.OwGetEntity((long?)Eval("ReligionID")).ParentID).Name.OwGetLeft(100, true)%>
                            </td>
                        </tr>
                                                
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table>                        
                        <tr>
                            <td>
                                <%--<asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:--%>
                                <owc:OwR ID="DeletedOwR" runat="server" OwText="DeletedLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox SkinID="OwCheckBox" ID="IsDeletedCheckBox" runat="server" Text= '<%# Eval("OpenHomeProfileReligionProcessID")%>'
                                    Checked='<%#Eval("IsDeleted")%>' AutoPostBack="true" 
                                    CssClass="HiddenText" 
                                    oncheckedchanged="IsDeletedCheckBox_CheckedChanged" />
                            </td>
                        </tr>                        
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/HomeProfileReligionProcessEdit.aspx?id=<%#Eval("OpenHomeProfileReligionProcessID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <ItemTemplate>                    
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
    </MasterTableView>

<FilterMenu EnableImageSprites="False">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</FilterMenu>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</HeaderContextMenu>
</owc:OwGrid>
<%--<owc:OwObjectDataSource ID="OwObjectDataSource1" runat="server" 
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileReligionProcessEntity" 
    DeleteMethod="OwDelete" InsertMethod="OwInsert" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic" 
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileReligionProcessBLL" 
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="religionID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>--%>

<owc:OwObjectDataSource ID="HomeProfileReligionProcessOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileReligionProcessEntity"
    DeleteMethod="OwDelete" OldValuesParameterFormatString="original_{0}" 
    SelectMethod="OwGetByDynamic" EnablePaging="True"
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileReligionProcessBLL" 
    SelectCountMethod="OwGetByDynamicCount"
    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
        <asp:Parameter Name="religionID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
